import React from 'react';
import ReactDOM from 'react-dom';

import {Provider} from 'mobx-react';

import OdocCk from 'weaOdocCk';

const Postil = OdocCk.Postil;

ReactDOM.render(
  <Provider postilStore={OdocCk.store.postilStore}>
    <Postil/>
  </Provider>, document.getElementById('postil'));

const Revision = OdocCk.Revision;

ReactDOM.render(
  <Provider revisionStore={OdocCk.store.revisionStore}>
    <Revision/>
  </Provider>, document.getElementById('revise'));
if (OdocCk.WindowUtil) {
  for (let key in OdocCk.WindowUtil) {
    window[key] = OdocCk.WindowUtil[key];
  }
}
if (CKEDITOR){
  CKEDITOR.on('instanceReady', () => {
    window.reactReady();
  })
}